import { FC, memo } from 'react'
const FileViewer = require('react-file-viewer')
import { Empty } from 'antd'
interface IProps {
  fileType: string
  filePath: string
}

const FilePreview: FC<IProps> = ({ fileType, filePath }) => {
  return (
    <>
      {fileType ? (
        <FileViewer fileType={fileType} filePath={filePath} />
      ) : (
        <Empty />
      )}
    </>
  )
}

export default memo(FilePreview)
